package com.entity;

import java.util.ArrayList;
import java.util.List;

public class GoodsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public GoodsExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andGidIsNull() {
            addCriterion("gid is null");
            return (Criteria) this;
        }

        public Criteria andGidIsNotNull() {
            addCriterion("gid is not null");
            return (Criteria) this;
        }

        public Criteria andGidEqualTo(String value) {
            addCriterion("gid =", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidNotEqualTo(String value) {
            addCriterion("gid <>", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidGreaterThan(String value) {
            addCriterion("gid >", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidGreaterThanOrEqualTo(String value) {
            addCriterion("gid >=", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidLessThan(String value) {
            addCriterion("gid <", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidLessThanOrEqualTo(String value) {
            addCriterion("gid <=", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidLike(String value) {
            addCriterion("gid like", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidNotLike(String value) {
            addCriterion("gid not like", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidIn(List<String> values) {
            addCriterion("gid in", values, "gid");
            return (Criteria) this;
        }

        public Criteria andGidNotIn(List<String> values) {
            addCriterion("gid not in", values, "gid");
            return (Criteria) this;
        }

        public Criteria andGidBetween(String value1, String value2) {
            addCriterion("gid between", value1, value2, "gid");
            return (Criteria) this;
        }

        public Criteria andGidNotBetween(String value1, String value2) {
            addCriterion("gid not between", value1, value2, "gid");
            return (Criteria) this;
        }

        public Criteria andGtidIsNull() {
            addCriterion("gtid is null");
            return (Criteria) this;
        }

        public Criteria andGtidIsNotNull() {
            addCriterion("gtid is not null");
            return (Criteria) this;
        }

        public Criteria andGtidEqualTo(String value) {
            addCriterion("gtid =", value, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidNotEqualTo(String value) {
            addCriterion("gtid <>", value, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidGreaterThan(String value) {
            addCriterion("gtid >", value, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidGreaterThanOrEqualTo(String value) {
            addCriterion("gtid >=", value, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidLessThan(String value) {
            addCriterion("gtid <", value, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidLessThanOrEqualTo(String value) {
            addCriterion("gtid <=", value, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidLike(String value) {
            addCriterion("gtid like", value, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidNotLike(String value) {
            addCriterion("gtid not like", value, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidIn(List<String> values) {
            addCriterion("gtid in", values, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidNotIn(List<String> values) {
            addCriterion("gtid not in", values, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidBetween(String value1, String value2) {
            addCriterion("gtid between", value1, value2, "gtid");
            return (Criteria) this;
        }

        public Criteria andGtidNotBetween(String value1, String value2) {
            addCriterion("gtid not between", value1, value2, "gtid");
            return (Criteria) this;
        }

        public Criteria andShidIsNull() {
            addCriterion("shid is null");
            return (Criteria) this;
        }

        public Criteria andShidIsNotNull() {
            addCriterion("shid is not null");
            return (Criteria) this;
        }

        public Criteria andShidEqualTo(String value) {
            addCriterion("shid =", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotEqualTo(String value) {
            addCriterion("shid <>", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidGreaterThan(String value) {
            addCriterion("shid >", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidGreaterThanOrEqualTo(String value) {
            addCriterion("shid >=", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLessThan(String value) {
            addCriterion("shid <", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLessThanOrEqualTo(String value) {
            addCriterion("shid <=", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLike(String value) {
            addCriterion("shid like", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotLike(String value) {
            addCriterion("shid not like", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidIn(List<String> values) {
            addCriterion("shid in", values, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotIn(List<String> values) {
            addCriterion("shid not in", values, "shid");
            return (Criteria) this;
        }

        public Criteria andShidBetween(String value1, String value2) {
            addCriterion("shid between", value1, value2, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotBetween(String value1, String value2) {
            addCriterion("shid not between", value1, value2, "shid");
            return (Criteria) this;
        }

        public Criteria andAdidIsNull() {
            addCriterion("adid is null");
            return (Criteria) this;
        }

        public Criteria andAdidIsNotNull() {
            addCriterion("adid is not null");
            return (Criteria) this;
        }

        public Criteria andAdidEqualTo(String value) {
            addCriterion("adid =", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidNotEqualTo(String value) {
            addCriterion("adid <>", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidGreaterThan(String value) {
            addCriterion("adid >", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidGreaterThanOrEqualTo(String value) {
            addCriterion("adid >=", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidLessThan(String value) {
            addCriterion("adid <", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidLessThanOrEqualTo(String value) {
            addCriterion("adid <=", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidLike(String value) {
            addCriterion("adid like", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidNotLike(String value) {
            addCriterion("adid not like", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidIn(List<String> values) {
            addCriterion("adid in", values, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidNotIn(List<String> values) {
            addCriterion("adid not in", values, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidBetween(String value1, String value2) {
            addCriterion("adid between", value1, value2, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidNotBetween(String value1, String value2) {
            addCriterion("adid not between", value1, value2, "adid");
            return (Criteria) this;
        }

        public Criteria andGnameIsNull() {
            addCriterion("gname is null");
            return (Criteria) this;
        }

        public Criteria andGnameIsNotNull() {
            addCriterion("gname is not null");
            return (Criteria) this;
        }

        public Criteria andGnameEqualTo(String value) {
            addCriterion("gname =", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameNotEqualTo(String value) {
            addCriterion("gname <>", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameGreaterThan(String value) {
            addCriterion("gname >", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameGreaterThanOrEqualTo(String value) {
            addCriterion("gname >=", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameLessThan(String value) {
            addCriterion("gname <", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameLessThanOrEqualTo(String value) {
            addCriterion("gname <=", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameLike(String value) {
            addCriterion("gname like", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameNotLike(String value) {
            addCriterion("gname not like", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameIn(List<String> values) {
            addCriterion("gname in", values, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameNotIn(List<String> values) {
            addCriterion("gname not in", values, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameBetween(String value1, String value2) {
            addCriterion("gname between", value1, value2, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameNotBetween(String value1, String value2) {
            addCriterion("gname not between", value1, value2, "gname");
            return (Criteria) this;
        }

        public Criteria andGpriceIsNull() {
            addCriterion("gprice is null");
            return (Criteria) this;
        }

        public Criteria andGpriceIsNotNull() {
            addCriterion("gprice is not null");
            return (Criteria) this;
        }

        public Criteria andGpriceEqualTo(Integer value) {
            addCriterion("gprice =", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceNotEqualTo(Integer value) {
            addCriterion("gprice <>", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceGreaterThan(Integer value) {
            addCriterion("gprice >", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceGreaterThanOrEqualTo(Integer value) {
            addCriterion("gprice >=", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceLessThan(Integer value) {
            addCriterion("gprice <", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceLessThanOrEqualTo(Integer value) {
            addCriterion("gprice <=", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceIn(List<Integer> values) {
            addCriterion("gprice in", values, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceNotIn(List<Integer> values) {
            addCriterion("gprice not in", values, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceBetween(Integer value1, Integer value2) {
            addCriterion("gprice between", value1, value2, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceNotBetween(Integer value1, Integer value2) {
            addCriterion("gprice not between", value1, value2, "gprice");
            return (Criteria) this;
        }

        public Criteria andGdescIsNull() {
            addCriterion("gdesc is null");
            return (Criteria) this;
        }

        public Criteria andGdescIsNotNull() {
            addCriterion("gdesc is not null");
            return (Criteria) this;
        }

        public Criteria andGdescEqualTo(String value) {
            addCriterion("gdesc =", value, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescNotEqualTo(String value) {
            addCriterion("gdesc <>", value, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescGreaterThan(String value) {
            addCriterion("gdesc >", value, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescGreaterThanOrEqualTo(String value) {
            addCriterion("gdesc >=", value, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescLessThan(String value) {
            addCriterion("gdesc <", value, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescLessThanOrEqualTo(String value) {
            addCriterion("gdesc <=", value, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescLike(String value) {
            addCriterion("gdesc like", value, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescNotLike(String value) {
            addCriterion("gdesc not like", value, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescIn(List<String> values) {
            addCriterion("gdesc in", values, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescNotIn(List<String> values) {
            addCriterion("gdesc not in", values, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescBetween(String value1, String value2) {
            addCriterion("gdesc between", value1, value2, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGdescNotBetween(String value1, String value2) {
            addCriterion("gdesc not between", value1, value2, "gdesc");
            return (Criteria) this;
        }

        public Criteria andGcommentIsNull() {
            addCriterion("gcomment is null");
            return (Criteria) this;
        }

        public Criteria andGcommentIsNotNull() {
            addCriterion("gcomment is not null");
            return (Criteria) this;
        }

        public Criteria andGcommentEqualTo(String value) {
            addCriterion("gcomment =", value, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentNotEqualTo(String value) {
            addCriterion("gcomment <>", value, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentGreaterThan(String value) {
            addCriterion("gcomment >", value, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentGreaterThanOrEqualTo(String value) {
            addCriterion("gcomment >=", value, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentLessThan(String value) {
            addCriterion("gcomment <", value, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentLessThanOrEqualTo(String value) {
            addCriterion("gcomment <=", value, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentLike(String value) {
            addCriterion("gcomment like", value, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentNotLike(String value) {
            addCriterion("gcomment not like", value, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentIn(List<String> values) {
            addCriterion("gcomment in", values, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentNotIn(List<String> values) {
            addCriterion("gcomment not in", values, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentBetween(String value1, String value2) {
            addCriterion("gcomment between", value1, value2, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGcommentNotBetween(String value1, String value2) {
            addCriterion("gcomment not between", value1, value2, "gcomment");
            return (Criteria) this;
        }

        public Criteria andGstateIsNull() {
            addCriterion("gstate is null");
            return (Criteria) this;
        }

        public Criteria andGstateIsNotNull() {
            addCriterion("gstate is not null");
            return (Criteria) this;
        }

        public Criteria andGstateEqualTo(Integer value) {
            addCriterion("gstate =", value, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateNotEqualTo(Integer value) {
            addCriterion("gstate <>", value, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateGreaterThan(Integer value) {
            addCriterion("gstate >", value, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateGreaterThanOrEqualTo(Integer value) {
            addCriterion("gstate >=", value, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateLessThan(Integer value) {
            addCriterion("gstate <", value, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateLessThanOrEqualTo(Integer value) {
            addCriterion("gstate <=", value, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateIn(List<Integer> values) {
            addCriterion("gstate in", values, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateNotIn(List<Integer> values) {
            addCriterion("gstate not in", values, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateBetween(Integer value1, Integer value2) {
            addCriterion("gstate between", value1, value2, "gstate");
            return (Criteria) this;
        }

        public Criteria andGstateNotBetween(Integer value1, Integer value2) {
            addCriterion("gstate not between", value1, value2, "gstate");
            return (Criteria) this;
        }

        public Criteria andGnumIsNull() {
            addCriterion("gnum is null");
            return (Criteria) this;
        }

        public Criteria andGnumIsNotNull() {
            addCriterion("gnum is not null");
            return (Criteria) this;
        }

        public Criteria andGnumEqualTo(Integer value) {
            addCriterion("gnum =", value, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumNotEqualTo(Integer value) {
            addCriterion("gnum <>", value, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumGreaterThan(Integer value) {
            addCriterion("gnum >", value, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumGreaterThanOrEqualTo(Integer value) {
            addCriterion("gnum >=", value, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumLessThan(Integer value) {
            addCriterion("gnum <", value, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumLessThanOrEqualTo(Integer value) {
            addCriterion("gnum <=", value, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumIn(List<Integer> values) {
            addCriterion("gnum in", values, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumNotIn(List<Integer> values) {
            addCriterion("gnum not in", values, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumBetween(Integer value1, Integer value2) {
            addCriterion("gnum between", value1, value2, "gnum");
            return (Criteria) this;
        }

        public Criteria andGnumNotBetween(Integer value1, Integer value2) {
            addCriterion("gnum not between", value1, value2, "gnum");
            return (Criteria) this;
        }

        public Criteria andGoldpriceIsNull() {
            addCriterion("goldprice is null");
            return (Criteria) this;
        }

        public Criteria andGoldpriceIsNotNull() {
            addCriterion("goldprice is not null");
            return (Criteria) this;
        }

        public Criteria andGoldpriceEqualTo(Integer value) {
            addCriterion("goldprice =", value, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceNotEqualTo(Integer value) {
            addCriterion("goldprice <>", value, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceGreaterThan(Integer value) {
            addCriterion("goldprice >", value, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceGreaterThanOrEqualTo(Integer value) {
            addCriterion("goldprice >=", value, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceLessThan(Integer value) {
            addCriterion("goldprice <", value, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceLessThanOrEqualTo(Integer value) {
            addCriterion("goldprice <=", value, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceIn(List<Integer> values) {
            addCriterion("goldprice in", values, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceNotIn(List<Integer> values) {
            addCriterion("goldprice not in", values, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceBetween(Integer value1, Integer value2) {
            addCriterion("goldprice between", value1, value2, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGoldpriceNotBetween(Integer value1, Integer value2) {
            addCriterion("goldprice not between", value1, value2, "goldprice");
            return (Criteria) this;
        }

        public Criteria andGimgIsNull() {
            addCriterion("gimg is null");
            return (Criteria) this;
        }

        public Criteria andGimgIsNotNull() {
            addCriterion("gimg is not null");
            return (Criteria) this;
        }

        public Criteria andGimgEqualTo(String value) {
            addCriterion("gimg =", value, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgNotEqualTo(String value) {
            addCriterion("gimg <>", value, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgGreaterThan(String value) {
            addCriterion("gimg >", value, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgGreaterThanOrEqualTo(String value) {
            addCriterion("gimg >=", value, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgLessThan(String value) {
            addCriterion("gimg <", value, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgLessThanOrEqualTo(String value) {
            addCriterion("gimg <=", value, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgLike(String value) {
            addCriterion("gimg like", value, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgNotLike(String value) {
            addCriterion("gimg not like", value, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgIn(List<String> values) {
            addCriterion("gimg in", values, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgNotIn(List<String> values) {
            addCriterion("gimg not in", values, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgBetween(String value1, String value2) {
            addCriterion("gimg between", value1, value2, "gimg");
            return (Criteria) this;
        }

        public Criteria andGimgNotBetween(String value1, String value2) {
            addCriterion("gimg not between", value1, value2, "gimg");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}